﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Skills : MonoBehaviour {

    private bool s_flyfoot = false;
    private float speedIncrease = 0.0f;
    //飞毛腿
    private void S_FlyFoot()
    {
        if (s_flyfoot == false)
        {
            speedIncrease = Baobao.speed * 1.75f - Baobao.speed; //记录速度增量
            Baobao.speed *= 1.75f;
            
            s_flyfoot = true;
        }
        else
        {
            Baobao.speed -= speedIncrease;
            s_flyfoot = false;
        }

    }

	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
        if (Input.GetKeyDown(KeyCode.Q))
        {
            //anim.SetTrigger("Right");
            //anim.SetTrigger("Attack1");
            S_FlyFoot();
        }
    }

}
